package logic

import (
	"context"
	"video-guard/models/mysql"

	"video-guard/videorpc/internal/svc"
	"video-guard/videorpc/videorpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type CommentDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCommentDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommentDelLogic {
	return &CommentDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *CommentDelLogic) CommentDel(in *videorpc.CommentDelTRequest) (*videorpc.CommentDelTResponse, error) {
	// todo: add your logic here and delete this line
	var comment mysql.CommentInfo
	err := comment.CommentDel(mysql.DB, in)
	if err != nil {
		return nil, err
	}
	return &videorpc.CommentDelTResponse{}, nil
}
